﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Master/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="PurchaseOrderAdd_Step3.aspx.cs" Inherits="HZ.DrugTrade.Web.Admin.ProcureManage.PurchaseOrderAdd_Step3"
    Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script language="javascript" type="text/javascript">
        function check_isnum()   
        {  
          if((window.event.keyCode>95&&window.event.keyCode<106)   
          ||(window.event.keyCode>47&&window.event.keyCode<59)   
          ||window.event.keyCode==8   
          ||window.event.keyCode==46   
          ||window.event.keyCode==37   
          ||window.event.keyCode==39) {

              return true;  
          }   
          else   {   
          
          return   false;   
          }   
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
        <ul>
            <li class="active"><a href="javascript:void(0);">选择产品</a></li>
        </ul>
    </div>
    <div class="maincon">
        
        <div id="note2">
        </div>
    </div>
    <asp:GridView ID="gvwProduceCatalog" CssClass="mainlist" runat="server" AutoGenerateColumns="False"
        DataKeyNames="ProcureCatalogID,CompanyID_PS" EmptyDataText="该医疗机构暂无可采购的产品！">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %>
                </ItemTemplate>
                <HeaderStyle Width="30px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="采购数量">
                <ItemTemplate>
                    <asp:TextBox ID="txtCount" runat="server" Width="50px" oncontextmenu="javascript:return false;"
                        onblur="javascript:return check_isnum();" onkeydown="javascript:return check_isnum();"  MaxLength="5" ToolTip="整数类型(格式如10)"></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="采购价格">
                <ItemTemplate>
                    <asp:Label ID="lblPrice" runat="server" Text='<%#HZ.DrugTrade.Web.Function.FormPrice(Eval("ProjectID"), Eval("Price")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="GoodsName" HeaderText="产品名称"/>
             <asp:BoundField DataField="Material" HeaderText="材质" NullDisplayText="无" />
            <asp:BoundField DataField="Outlookc" HeaderText="规格" />
            <asp:BoundField DataField="Unit" HeaderText="最小计量单位" />
            <asp:BoundField DataField="PackUnit" HeaderText="包装单位" />
            <asp:BoundField DataField="QualityLevel" HeaderText="产品类别" />
            <asp:BoundField DataField="ProcurePrice" HeaderText="采购限价" DataFormatString="{0:N4}"  Visible="false"/>
            <asp:BoundField DataField="CompanyName_SC" HeaderText="生产企业" />
            <asp:BoundField DataField="CompanyName_PS" HeaderText="配送企业" />
            <asp:TemplateField>
                <HeaderTemplate>
                    <input id="addTable_chkAll" name="chkAll" type="checkbox" onclick="SelectAllCheckboxes(this,'ctl00_ContentPlaceHolder1_gvwProduceCatalog','addTable_chkAll'); " />
                </HeaderTemplate>
                <ItemTemplate>
                    <input type="checkbox" name="checkbox1" id="checkbox1" onclick="chkChecked(this,'ctl00_ContentPlaceHolder1_gvwProduceCatalog','addTable_chkAll');"
                        runat="server"/>
                </ItemTemplate>
                <HeaderStyle Width="25px" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
     <div class="page">
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
    </webdiyer:AspNetPager>
    </div>
    <div class="listip">
        <ul>
            <li>提示:<span> 选择需要采购的产品，点击“加入采购单”,采购完成后点击“完成采购单”。</span></li>
        </ul>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnAdd" runat="server" OperateType="编辑" Text="加入采购单" OnClick="btnAdd_Click" OnClientClick="return checkSelectedItems('ctl00_ContentPlaceHolder1_gvwProduceCatalog','请至少选择一个产品！');" CssClass="btn" />
        &nbsp;
        <hz:HzButton ID="btnFinish" runat="server" Text="制单完成"  OperateType="编辑"
            OnClick="btnFinish_Click" CssClass="btn" />
    </div>
</asp:Content>
